import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
   },
  // {
  //   path: '/about',
  //   name: 'about',
  //   component: () => import('../views/AboutView.vue')
  // },
  {
    path: '/aboutpet',
    name: 'aboutpet',
    component: () => import('../views/AboutPet.vue')
  },
  {
    path: '/aboutus',
    name: 'aboutus',
    component: () => import('../views/AboutUs.vue')
  },
  {
    path: '/comment',
    name: 'comment',
    component: () => import('../views/Comment.vue'),

  },
  {
    // path:'/answer/:id',
    path:'/answer',
    name: 'answer',
    component: () => import('../components/AnswerView.vue') 
  },
  {
    path: '/joinus',
    name: 'joinus',
    component: () => import('../views/JoinUs.vue')
  },
  {
    path: '/knowofpet',
    name: 'knowofpet',
    component: () => import('../views/KnowOfPet.vue')
  },
  {
    path: '/notice',
    name: 'notice',
    component: () => import('../views/Notice.vue')
  },
  {
    path: '/petconsult',
    name: 'petconsult',
    component: () => import('../views/PetConsult.vue')
  },
  {
    path: '/petdoctor',
    name: 'petdoctor',
    component: () => import('../views/PetDoctor.vue')
  },
  {
    path: '/Know',
    name: 'Know',
    component: () => import('../components/Know.vue')
  },
  {
    path: '/More/:id',
    name: 'More',
    component: () => import('../components/More.vue')
  },
  {
    path: '/petAbout',
    name: 'petAbout',
    component: () => import('../components/petAbout.vue')
  },
  {
    path: '/Aboutmore/:id',
    name: 'Aboutmore',
    component: () => import('../components/Aboutmore.vue')
  },
  {
    path: '/Consultpet',
    name: 'Consultpet',
    component: () => import('../components/Consultpet.vue')
  },
  {
    path: '/Consultmore/:id',
    name: 'Consultmore',
    component: () => import('../components/Consultmore.vue')
  },
  {
    path: '/Notfound',
    name: 'Notfound',
    component: () => import('../components/Notfound.vue')
  },
  {
    path: '/userinfo', 
    name: 'userinfo',
    component: () => import('../views/UserInfo.vue')
  },
  {
    path: '/mylogin',
    name: 'mylogin',
    component: () => import('../components/MyLogin.vue')
  },
  {
    path: '/myregister',
    name: 'myregister',
    component: () => import('../components/MyRegister.vue')
  },
  {
    path: '/updinfo',
    name: 'updinfo',
    component: () => import('../components/UpdInfo.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
